package com.thinkcube.edutainment.domain.data;

import android.os.Parcel;
import android.os.Parcelable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class WikiData implements Parcelable {

	@JsonProperty("id")
	private String id;

	@JsonProperty("page_title")
	private String pageTitle;

	@JsonProperty("page_content")
	private String pageContent;
	@JsonProperty("created_date")
	private DateData createdDate;
	@JsonProperty("created_user")
	private String createdUser;
	@JsonProperty("updated_date")
	private String updatedDate;
	@JsonProperty("updated_user")
	private String updatedUser;

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPageTitle() {
		return this.pageTitle;
	}

	public void setPageTitle(String pageTitle) {
		this.pageTitle = pageTitle;
	}

	public String getPageContent() {
		return this.pageContent;
	}

	public void setPageContent(String pageContent) {
		this.pageContent = pageContent;
	}

	public DateData getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(DateData createdDate) {
		this.createdDate = createdDate;
	}

	public String getCreatedUser() {
		return this.createdUser;
	}

	public void setCreatedUser(String createdUser) {
		this.createdUser = createdUser;
	}

	public String getUpdatedDate() {
		return this.updatedDate;
	}

	public void setUpdatedDate(String updatedDate) {
		this.updatedDate = updatedDate;
	}

	public String getUpdatedUser() {
		return this.updatedUser;
	}

	public void setUpdatedUser(String updatedUser) {
		this.updatedUser = updatedUser;
	}

	protected WikiData(Parcel in) {
		id = in.readString();
		pageTitle = in.readString();
		pageContent = in.readString();
		createdDate = (DateData) in.readValue(DateData.class.getClassLoader());
		createdUser = in.readString();
		updatedDate = in.readString();
		updatedUser = in.readString();
	}

	public WikiData() {
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(pageTitle);
		dest.writeString(pageContent);
		dest.writeValue(createdDate);
		dest.writeString(createdUser);
		dest.writeString(updatedDate);
		dest.writeString(updatedUser);
	}

	public static final Parcelable.Creator<WikiData> CREATOR = new Parcelable.Creator<WikiData>() {
		public WikiData createFromParcel(Parcel in) {
			return new WikiData(in);
		}

		public WikiData[] newArray(int size) {
			return new WikiData[size];
		}
	};
}